import { AbsFormUtil } from '@abstract/form';
import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { GriderList } from '@app/store/dict';
import { AuthService } from '@service/auth.service';
import { VisitService } from '@service/visit.service';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
	selector: 'app-disclose-record',
	templateUrl: './disclose-record.component.html',
	styleUrls: ['./disclose-record.component.less']
})
export class DiscloseRecordComponent extends AbsFormUtil implements OnInit {

	
	nzLoading = false;
	data = [];
	griderList = GriderList;

	treatResult = '';
	constructor(
		private visitService: VisitService,
		private nzMessageService: NzMessageService,
		private fb: FormBuilder,
		private authService: AuthService

	) {
		super();
	}
	ngOnInit() {
		this.authList = this.authService.getAuth();
		this.buildForm();
		
	}

	buildForm() {
		this.validateForm = this.fb.group({
			discloseTitle: []
		});
	}

	async onSearch(isPageInit?: boolean) {
		this.nzLoading = true;
		if (isPageInit) {
			this.page.page = 1;
		}
		const formValue = this.validateForm.value;
		const params = { ...formValue, ...this.page };
		console.log(params);
		return;
		const result = await this.visitService.getVisitTheme(params);
		console.log(result);
		this.nzLoading = false;

	}


	pageChange() {
		console.log(this.page);
		// this.onSearch();
	}

	detail(item) {

	}

	handle(item) {
		console.log(item, this.treatResult);
	}
	cancelHandle() {
		this.treatResult = '';
	}

}
